home *** CD-ROM | disk | FTP | other *** search
/ Microsoft Interactive CD Sampler / Microsoft Interactive CD Sampler.iso / DEMOS / C_Automp / AUTOTP / IMD.CST / 00015.ls < prev    next >
Encoding:
Text File  |  1996-07-16  |  673 b   |  30 lines

  1. on wait x,res
  2.   -- Copyright 1995 Interactive Media Design, Inc.
  3.   -- causes a pause for duration specified.
  4.   -- x - how many of "res" to wait
  5.   -- res - resolution, #t = ticks, #s = seconds, #m = minutes, #h = hours
  6.   if voidP(res) then
  7.     set res = #t
  8.   end if
  9.   if res = #sound then
  10.     repeat while soundBusy(x)
  11.       idle
  12.       updateStage
  13.     end repeat
  14.   else
  15.     if res = #t then
  16.       set y = 1
  17.     else if res = #s then
  18.       set y = 60
  19.     else if res = #m then
  20.       set y = 60 * 60
  21.     else if res = #h then
  22.       set y = power(60,3)
  23.     end if
  24.     startTimer
  25.     repeat while the timer <= (x * y)
  26.       nothing
  27.       updateStage
  28.     end repeat
  29.   end if
  30. end